﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.CompositeUI;
using Microsoft.Practices.CompositeUI.EventBroker;

namespace FireEvent
{
	public class Publisher
	{
		private WorkItem workItem;
		[ServiceDependency]
		public WorkItem WorkItem
		{
			set { workItem = value; }
		}

		public void FireMyEvent() 
		{
			workItem.EventTopics["MyEvent"].Fire(this, EventArgs.Empty, null, PublicationScope.Global);
		}
	}
}
